package Java.Class.Medium;

import java.util.ArrayList;

public class Item {
    private ArrayList<Item> listItem = new ArrayList<Item>();
    private String title;
    private int number;
    private int playtime;
    private boolean gotit = false;
    private String coment;

    public Item() {
    }

    public Item(String title, int number, int playtime, boolean gotit, String coment) {
        this.title = title;
        this.number = number;
        this.playtime = playtime;
        this.gotit = gotit;
        this.coment = coment;
    }

    public void add(Item item) {
        listItem.add(item);
    }

    public void list() {
        for (Item item : listItem) {
            item.print();
        }
    }

    public void print() {
        System.out.print(title + "  " + gotit + "   " + coment);

    }
}
